public class vyuea {
    public static void main(String[] args) {
        int sum = 0;
        int[] nums = new int[10];

        for (int i = nums.length-1; i >2 ; i--) {
           int left = 0,right = i-1;
            while (left<right){
            if(nums[left] + nums[right]>nums[i]){
                sum += right-left;
                right--;
            }
            else {
                left++;
            }
        }}
        return sum;
    }
}
